
****ALL FORECASTS****

****INDIVIDUAL FORECASTS
use "$jfqa_rep/21_DJIA_convexity_20.dta", clear

qui{
merge 1:m year month day using "$jfqa_rep/Shiller_Individual_Ests.dta"
keep if _merge==3
drop _merge

sort year month day
drop if abs(dow_1m)>=.5

gen monthyear=ym(year, month)
}

sum dow_1m, d

****CORPORATE FORECASTS
use "$jfqa_rep/21_DJIA_convexity_20.dta", clear

qui{
merge 1:m year month day using "$jfqa_rep/Shiller_Inst_Ests.dta"
keep if _merge==3
drop _merge

sort year month day
drop if abs(dow_1m)>=.5

gen monthyear=ym(year, month)
}

sum dow_1m, d

****ALL FORECASTS
use "$jfqa_rep/21_DJIA_convexity_20.dta", clear

qui{
merge 1:m year month day using "$jfqa_rep/Shiller_Inst_Ests.dta"
keep if _merge==3
drop _merge

preserve
tempfile copy

use "$jfqa_rep/21_DJIA_convexity_20.dta", clear

merge 1:m year month day using "$jfqa_rep/Shiller_Individual_Ests.dta"
keep if _merge==3
drop _merge

save `copy', replace

restore
append using `copy'

sort year month day

drop if year<1993

drop if abs(dow_1m)>=.5
}

sum dow_1m, d

**************DAILY AVERAGES****************
****INDIVIDUAL FORECASTS
use "$jfqa_rep/21_DJIA_convexity_20.dta", clear

qui{
merge 1:m year month day using "$jfqa_rep/Shiller_Individual_Ests.dta"
keep if _merge==3
drop _merge

sort year month day
drop if abs(dow_1m)>=.5

gen monthyear=ym(year, month)

collapse dow_1m, by(year month day)
}

sum dow_1m, d

****CORPORATE FORECASTS
use "$jfqa_rep/21_DJIA_convexity_20.dta", clear

qui{
merge 1:m year month day using "$jfqa_rep/Shiller_Inst_Ests.dta"
keep if _merge==3
drop _merge

sort year month day
drop if abs(dow_1m)>=.5

gen monthyear=ym(year, month)

collapse dow_1m, by(year month day)
}

sum dow_1m, d

****ALL FORECASTS
use "$jfqa_rep/21_DJIA_convexity_20.dta", clear

qui{
merge 1:m year month day using "$jfqa_rep/Shiller_Inst_Ests.dta"
keep if _merge==3
drop _merge

preserve
tempfile copy

use "$jfqa_rep/21_DJIA_convexity_20.dta", clear

merge 1:m year month day using "$jfqa_rep/Shiller_Individual_Ests.dta"
keep if _merge==3
drop _merge

save `copy', replace

restore
append using `copy'

sort year month day

drop if year<1993

drop if abs(dow_1m)>=.5

collapse dow_1m, by(year month day)
}

sum dow_1m, d
